#include "SMPPTLV.hpp"

using namespace smpp::pdu;

TLV::TLV(const quint16 nTag,const quint16 nLength):
_Tag(nTag),_Length(nLength){}

TLV::TLV(const TLV &nTLV):_Tag(nTLV.getTag()),_Length(nTLV.getLength()){}

bool TLV::operator ==(const TLV &nTLV) const{
	return (_Tag == nTLV.getTag()&&_Length == nTLV.getLength());
}

bool TLV::operator !=(const TLV &nTLV) const{
	return !this->operator == (nTLV);
}

TLV &TLV::operator = (const TLV &nTLV){
	if(*this == nTLV)
		return *this;
	_Tag = nTLV.getTag();
	_Length = nTLV.getLength();
	return *this;
}

void TLV::setTag(const quint16 nTag){
	_Tag = nTag;
}

const quint16 TLV::getTag() const{
	return _Tag;
}

void TLV::setLength(const quint16 nLength){
	_Length = nLength;
}

const quint16 TLV::getLength() const{
	return _Length;
}
